#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#pragma once

#define  Max 1000
#define Max_NAME 10
#define Max_SEX 5
#define Max_TELE 20
#define Max_ADDR 20

enum
{
	Exit,
	Add,
	Del,
	Search,
	Modify,
	Show,
	Sort
};

typedef struct PeoInfo
{
	char name[Max_NAME];
	int age;
	char sex[Max_SEX];
	char tele[Max_TELE];
	char addr[Max_ADDR];
}PeoInfo;

typedef struct Contact
{
	PeoInfo data[Max];
	int sz;
}Contact;

void InitContact(Contact* p);
void AddContact(Contact* p);
void DelContact(Contact* p);
void SearchContact(Contact* p);
void ModifyContact(Contact* p);
void ShowContact(const Contact* p);
void SortContact(Contact* p);